package net.csdn.business.kanban.common.model.vo;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Objects;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class UserInfoVO implements Serializable {

    /**
     * 用户ID
     */
    private String id;
    /**
     * 用户名
     */
    private String username;

    /**
     * 昵称
     */
    private String nickname;

    /**
     * 手机号
     */
    //private String phone;
    /**
     * 邮箱
     */
    private String email;
    /**
     * 头像
     */
    private String photo;



    @Override
    public boolean equals(Object o) {
        if (o == null || getClass() != o.getClass()) return false;
        if (this == o) return true;
        UserInfoVO user = (UserInfoVO) o;
        String userId=user.getId();
        if(userId!=null&&userId.equals(this.id)){
            return true;
        }
        return false;
    }

    @Override
    public int hashCode() {
        return Objects.hash(this.id);
    }
}